package com.redepronik.medisys.cithis.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the medicamentosustancias database table.
 * 
 */
@Entity
@Table(name="medicamentosustancias")
@NamedQuery(name="Medicamentosustancia.findAll", query="SELECT m FROM Medicamentosustancia m")
public class MedicamentoSustancia implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="MEDICAMENTOSUSTANCIAS_MEDICAMENTOSUSTANCIAID_GENERATOR" )
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MEDICAMENTOSUSTANCIAS_MEDICAMENTOSUSTANCIAID_GENERATOR")
	@Column(unique=true, nullable=false)
	private Integer medicamentosustanciaid;

	//bi-directional many-to-one association to Medicamentocomerciale
	@ManyToOne
	@JoinColumn(name="medicamentocomercialid", nullable=false)
	private MedicamentoComercial medicamentocomerciale;

	//bi-directional many-to-one association to Sustanciaactiva
	@ManyToOne
	@JoinColumn(name="sustanciaactivaid", nullable=false)
	private SustanciaActiva sustanciaactiva;

	public MedicamentoSustancia() {
	}

	public Integer getMedicamentosustanciaid() {
		return this.medicamentosustanciaid;
	}

	public void setMedicamentosustanciaid(Integer medicamentosustanciaid) {
		this.medicamentosustanciaid = medicamentosustanciaid;
	}

	public MedicamentoComercial getMedicamentocomerciale() {
		return this.medicamentocomerciale;
	}

	public void setMedicamentocomerciale(MedicamentoComercial medicamentocomerciale) {
		this.medicamentocomerciale = medicamentocomerciale;
	}

	public SustanciaActiva getSustanciaactiva() {
		return this.sustanciaactiva;
	}

	public void setSustanciaactiva(SustanciaActiva sustanciaactiva) {
		this.sustanciaactiva = sustanciaactiva;
	}

}